package com.api.gbhg.liuwenbo.test;

import com.alibaba.fastjson.JSON;
import com.api.gbhg.liuwenbo.pojo.TreeStucture;

import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.*;

public class A3_9 {
    public static void main(String[] args) {
        Map<String,Object> map = new HashMap<>();
        map.put("a","123");
        map.put("b","123");
        map.put("c","123");
        map.put("d","123");
        String[] a =  map.keySet().toArray(new String[map.size()]);
        System.out.println(JSON.toJSONString(a));

        StringBuffer sb = new StringBuffer();
        System.out.println(sb.toString().isEmpty());

        List<String> list = new ArrayList<>();
        list.add("1");
        list.add("2");
        list.add("3");
        List<String> list2 = new ArrayList<>();
        list2.addAll(list);
        list2.add("");
        System.out.println(JSON.toJSONString(list2));
        Object ob = "a";
        System.out.println(ob);
        Date date = new Date();
        SimpleDateFormat simpleFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
        String format = simpleFormat.format(date);

        System.out.println(format);
    }
}
